Create Job template
Creates a reusable job template that stores execution configuration for a Scenario or Test Suite. The executions can be triggered on demand using this job template Id
Headers
| Header | Value |
|---|---|
user_id | Login username (email) |
api_key | API key of the user for authentication |
Content-Type | application/json |
Accept | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accelqLoginUrl | string | Yes | The AccelQ login URL for API access. |
tenantCode | string | Yes | Tenant code for identifying the organization. |
projectCode | string | Yes | Project Code found under Auth properties of ACCELQ User Profile |
user_id | string | Yes | Login username (email) |
api_key | string | Yes | API key of the user for authentication |
Request Body
json
{
"runEntityType": "SCENARIO",
"scnPid": "15",
"testSuitePid": null,
"purpose": "ACME INC ticket booking.",
"appEnvironmentName": "Staging",
"appVariantOptionName": "Standard",
"screenshotMode": "OPTIMAL",
"loggerLevel": "STANDARD",
"runProperties": {
"todayPrice": "2000",
"totalTest": "5"
},
"executionParameters": {
"retryCount": 2,
"platform": "windows"
},
"timeOuts": {
"pageLoadWaitTime": "50",
"elementWaitTime": "40",
"apiTimeout": "60"
},
"agentInfo": {
"agentSelectionType": "BY_AVAILABILITY",
"agentNames": [
"PROD_agent-1",
"PROD_agent-2"
],
"agentByAvailabilityInfo": {
"namePattern": null,
"agentCountForJobDistribution": 3
},
"numOfParallelRuns": 2,
"browserExecution": {
"browser": {
"name": "EDGE",
"version": "12.54"
},
"targetDeviceType": "MOBILE",
"desktopDevice": null,
"mobileDevice": {
"os": "iOS",
"osVersion": "15",
"deviceName": "iPhone 15 Pro",
"udid": "1d97ec4fa8ae99f00e07f9c913c368cf6071a978",
"isRealDevice": "true",
"webDriverAgentUrl": null
},
"browserKeepAlive": true,
"enableWebAccessibilityTesting": "true",
"enableWebPerformanceTesting": "true",
"webPerformanceSlaThreshold": "10",
"webDriverProfileName": "Web Driver Profile 1"
},
"mobileAppTesting": {
"mobileExecDevices": [
{
"refName": "device 1",
"deviceName": "Iphone 15",
"os": "ios",
"osVersion": "15",
"appiumDriverUrl": "http://localhost:4723",
"webDriverAgentUrl": "127.0.0.1:50092"
}
],
"mobileDriverProfileName": "Mobile Driver Profile 3",
"mobileKeepAlive": false,
"skipReinstall": "false"
}
},
"enableSelfHealing": true,
"notifications": {
"notifyOnStart": "true",
"notifyOnCompletion": "true",
"notificationMode": "ON_ERROR",
"notificationEmails": [
"demo1@acmeInc.com",
"demo2@acmeInc.com"
],
"notificationChannels": {
"slackChannels": [
"Slack-channel-1"
],
"teamsChannels": [
"QA-Team",
"PKN-team"
]
}
},
"autoRerun": {
"failurePercentageLimit": "10",
"maxRerunAttempts": 5,
"delayBetweenReruns": 3,
"rerunOnNoImprovement": false
},
"setup": {
"testCaseSetup": {
"actionPid": "14",
"actionInputParams": [
{
"name": "configPath",
"valueType": "LITERAL",
"value": "/configs/settings.json"
},
{
"name": "maxRetries",
"valueType": "GLOBAL_PROPERTY",
"value": "GP 2"
}
]
},
"testJobSetup": {
"actionPid": "19",
"actionInputParams": [
{
"name": "retryCount",
"value": "3"
}
]
}
},
"teardown": {
"testCaseTeardown": {
"actionPid": "13",
"actionInputParams": [
{
"name": "filePath",
"valueType": "LITERAL",
"value": "/users/data.csv"
},
{
"name": "transactionLimit",
"valueType": "GLOBAL_PROPERTY",
"value": "GP 1"
}
]
},
"testJobTeardown": {
"actionPid": "18",
"actionInputParams": [
{
"name": "userAge",
"value": "21"
}
]
}
}
}
Responses
200 - Job creation successfull.
json
{
"jobPid": 42,
"message": "Template Job created successfully."
}
400 - Bad Request Error
json
{
"error": "Invalid runEntityType provided. Accepted values are : 'SCENARIO', 'TEST_SUITE'."
}
401 - Unauthorized - User does not have authorization
json
{
"error": "User does not exist."
}
404 - Not Found Error
json
{
"error": "Scenario with Pid 15 does not exists in the project."
}
cURL Command Builder
URL Parameters
Headers
Request Sample (cURL)
curl -X POST "${{accelqLoginUrl}}/awb/api/2.0/${{tenantCode}}/${{projectCode}}/test-exec/jobs/templates" \
-H "user_id: ${{user_id}}" \
-H "api_key: ${{api_key}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"runEntityType": "SCENARIO",
"scnPid": "15",
"testSuitePid": null,
"purpose": "ACME INC ticket booking.",
"appEnvironmentName": "Staging",
"appVariantOptionName": "Standard",
"screenshotMode": "OPTIMAL",
"loggerLevel": "STANDARD",
"runProperties": {
"todayPrice": "2000",
"totalTest": "5"
},
"executionParameters": {
"retryCount": 2,
"platform": "windows"
},
"timeOuts": {
"pageLoadWaitTime": "50",
"elementWaitTime": "40",
"apiTimeout": "60"
},
"agentInfo": {
"agentSelectionType": "BY_AVAILABILITY",
"agentNames": [
"PROD_agent-1",
"PROD_agent-2"
],
"agentByAvailabilityInfo": {
"namePattern": null,
"agentCountForJobDistribution": 3
},
"numOfParallelRuns": 2,
"browserExecution": {
"browser": {
"name": "EDGE",
"version": "12.54"
},
"targetDeviceType": "MOBILE",
"desktopDevice": null,
"mobileDevice": {
"os": "iOS",
"osVersion": "15",
"deviceName": "iPhone 15 Pro",
"udid": "1d97ec4fa8ae99f00e07f9c913c368cf6071a978",
"isRealDevice": "true",
"webDriverAgentUrl": null
},
"browserKeepAlive": true,
"enableWebAccessibilityTesting": "true",
"enableWebPerformanceTesting": "true",
"webPerformanceSlaThreshold": "10",
"webDriverProfileName": "Web Driver Profile 1"
},
"mobileAppTesting": {
"mobileExecDevices": [
{
"refName": "device 1",
"deviceName": "Iphone 15",
"os": "ios",
"osVersion": "15",
"appiumDriverUrl": "http://localhost:4723",
"webDriverAgentUrl": "127.0.0.1:50092"
}
],
"mobileDriverProfileName": "Mobile Driver Profile 3",
"mobileKeepAlive": false,
"skipReinstall": "false"
}
},
"enableSelfHealing": true,
"notifications": {
"notifyOnStart": "true",
"notifyOnCompletion": "true",
"notificationMode": "ON_ERROR",
"notificationEmails": [
"demo1@acmeInc.com",
"demo2@acmeInc.com"
],
"notificationChannels": {
"slackChannels": [
"Slack-channel-1"
],
"teamsChannels": [
"QA-Team",
"PKN-team"
]
}
},
"autoRerun": {
"failurePercentageLimit": "10",
"maxRerunAttempts": 5,
"delayBetweenReruns": 3,
"rerunOnNoImprovement": false
},
"setup": {
"testCaseSetup": {
"actionPid": "14",
"actionInputParams": [
{
"name": "configPath",
"valueType": "LITERAL",
"value": "/configs/settings.json"
},
{
"name": "maxRetries",
"valueType": "GLOBAL_PROPERTY",
"value": "GP 2"
}
]
},
"testJobSetup": {
"actionPid": "19",
"actionInputParams": [
{
"name": "retryCount",
"value": "3"
}
]
}
},
"teardown": {
"testCaseTeardown": {
"actionPid": "13",
"actionInputParams": [
{
"name": "filePath",
"valueType": "LITERAL",
"value": "/users/data.csv"
},
{
"name": "transactionLimit",
"valueType": "GLOBAL_PROPERTY",
"value": "GP 1"
}
]
},
"testJobTeardown": {
"actionPid": "18",
"actionInputParams": [
{
"name": "userAge",
"value": "21"
}
]
}
}
}'